<?
layout("/inc/layout.html",{title:sysTitle}){
?>
<div id="page-wrapper">
	<!--BEGIN TITLE & BREADCRUMB PAGE-->
	<div id="title-breadcrumb-option-demo" class="page-title-breadcrumb">
		<div class="page-header pull-left">
			<div class="page-title">自然语言处理</div>
		</div>
		<ol class="breadcrumb page-breadcrumb pull-left">
			<li><i class="fa fa-home"></i>&nbsp;<a href="main.html">首页</a>&nbsp;&nbsp;<i
				class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
			<li>自然语言处理&nbsp;&nbsp;<i class="fa fa-angle-right"></i>&nbsp;&nbsp;</li>
			<li class="active">依存句法分析</li>
		</ol>
		<div class="clearfix"></div>
	</div>
	<!--END TITLE & BREADCRUMB PAGE-->
	<!--BEGIN CONTENT-->
	<div class="page-content" style="margin-left:50px; margin-right:50px;">
		
		<img src="images/slide2.png" width="70%" height="100px;"/>
		
		<div class="row" style="margin-top: 10px;">
			<!-- <div class="col-lg-12" style="margin-top: 10px;"> -->
				<div class="form-group">
					<div class="col-md-12" style="text-align:center">
						<label for="inputPhone" class="control-label pull-left"><h4>例句1:</h4></label>
					</div>
					<!-- <div class="col-md-12"> -->
						<div class="col-md-11">
							<input  type="text" class="form-control" id="example1" style="width:100%;height:34px;" value="旅客因藏匿6个柠檬被新西兰海关拒绝入境">
						</div>
						<div class="col-lg-1" >
							<a href="#" onclick="submitForm('example1');" class="btn btn-success pull-left">句法分析<i class="fa fa-rocket"></i></a>
						</div>
					<!-- </div> -->
				</div>
				<div class="form-group">
					<div class="col-md-12" style="text-align:center">
						<label for="inputPhone" class="control-label pull-left"><h4>例句2:</h4></label>
					</div>
					<!-- <div class="col-md-12"> -->
						<div class="col-md-11 ">
							<input type="text" class="form-control" id="example2" style="width:100%;height:34px;" value="外交部就习近平出席核安全峰会举行吹风会">
						</div>
						<div class="col-lg-1" >
							<a href="#" onclick="submitForm('example2');" class="btn btn-success pull-left">句法分析<i class="fa fa-rocket"></i></a>
						</div>
					<!-- </div> -->
				</div>
				<div class="form-group">
					<div class="col-md-12" style="text-align:center">
						<label for="inputPhone" class="control-label pull-left"><h4>例句3:</h4></label>
					</div>
					<!-- <div class="col-md-12"> -->
						<div class="col-md-11">
							<input type="text" class="form-control" id="example3" style="width:100%;height:34px;" value="高科生物一名董事因涉疫苗案被福建警方控制">
						</div>
						<div class="col-lg-1" >
							<a href="#" onclick="submitForm('example3');" class="btn btn-success pull-left">句法分析<i class="fa fa-rocket"></i></a>
						</div>
					<!-- </div> -->
				</div>
			<!-- </div> -->
		</div>
		
		<div class="row" style="margin-top: 10px;">
			<div class="col-lg-12">
				<!-- <ul id="generalTab" class="nav nav-tabs ul-edit responsive">
					<li class="active"><a href="#dp-1" data-toggle="tab">词性标注</a></li>
					<li><a href="#dp-2" data-toggle="tab">基于词表标注</a></li>
					<li><a href="#dp-3" data-toggle="tab">实体识别</a></li>
					<li><a href="#dp-4" data-toggle="tab">依存句法分析</a></li>
					<li><a href="#dp-5" data-toggle="tab">自动摘要</a></li>
					<li><a href="#dp-6" data-toggle="tab">关键词提取</a></li>
					<li><a href="#dp-7" data-toggle="tab">语义联想</a></li>
				</ul> -->
				<div  class="tab-content responsive" style="min-height:300px">
					<!-- 依存句法分析 -->
					<div id="dp-4" class="tab-pane fade in active">
						<div class="row">
							<div class="col-lg-12">
								
								<dd class="mod_result_content result_sentence dependency_chart" style="overflow: auto;">
									数据为空！
								</dd>
								<dd class="mod_result_content result_tabs dependency_text">
									<div class="result_tabs_wrap result_tabs_wrap_first">
									</div>
								</dd>
								
							</div>
							 
						</div>
					</div>
				</div>
			</div>
		</div>
		
		

	</div>
	<!--END CONTENT-->
</div>

<link type="text/css" rel="stylesheet" href="static/dependency.css">

<script type="text/javascript" src="static/d3.min.js"></script>
<script type="text/javascript" src="static/lex.js"></script>
<script type="text/javascript" src="static/dependency.js"></script>

<SCRIPT type="text/javascript">

function submitForm(exampleId) {
	var text = $("#"+exampleId).val();
	if($.trim(text).length<1) {
		alert("请输入待处理文本");
		return false;
	}
	/* alert(text) */
	submitDependencyParser(text);
}


// 依存分析
function submitDependencyParser(text) {
	$.ajax({
		type: "post",
		url: "nlp-demo-dependencyParser.html",
		data: {
			"text": text
		},
		dataType: "json",
		success: function(data) {
			get_dependency(data[0]);
		},
		error : function(data) {
			// alert("请求失败");
		}
	});
}

</SCRIPT>


<?} ?>

